/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.is.city.search;

import java.awt.event.ActionEvent;
import javax.swing.*;

/**
 *
 * @author oleg
 */
public class SearchToolbar extends JToolBar {
    SearchSettingsController controller;

    public SearchToolbar(int orientation, final SearchSettingsController controller) {
        super(orientation);

        Icon onIcon = new ImageIcon(SearchToolbar.class.getResource("/search-icon.png"));
        JButton button1 = new JButton(onIcon);
        add(button1);
        Icon onIcon2 = new ImageIcon(SearchToolbar.class.getResource("/Settings-icon-mini.png"));
        JButton button2 = new JButton(new AbstractAction("settings", onIcon2) {

            @Override
            public void actionPerformed(ActionEvent e) {
                JSearchFrame frame = new JSearchFrame(controller);
                frame.setVisible(true);
            }
        });
        add(button2);

        this.setSize(100, 60);
        setRollover(true);
    }
}
